{{template "admin/public/head.html" .}}
<section>
	<aside>
		{{template "admin/public/nav.html" .}}
	</aside>
	<article>
		<div class="top-title">
			<dl>
				<dt><h1>{{.title}}</h1></dt>
				<dd>&nbsp;</dd>
				<dd><a href="wood_help.html"><i class="iconfont">&#xe649;</i>帮助文档</a></dd>
			</dl>
		</div>
		<!-- <div class="nav1">
			<ul>
				<a href="works_index.html" class="no"><li>全部产品</li></a>
				<a href="works_index.html"><li>产品分类</li></a>
				<a href="works_index.html"><li>产品分类</li></a>
				<a href="works_index.html"><li>产品分类</li></a>
				<a href="works_index.html"><li>产品分类</li></a>
				<a href="works_index.html"><li>产品分类</li></a>
			</ul>
		</div> -->
		<div class="content">
			<div class="release">
				<dl>
					<dt><i class="iconfont">&#xe649;</i> <b>{{.title}}说明</b><br>
						下方是{{.title}}列表,可以进行添加,修改,删除<br>
						<p>品牌是平台所经营产品的品牌,所属类目选择之后,页面之中对应的栏目中会出现对应的品牌供用户筛选</p>
					</dt>
					<!-- <dd><a href="function_index.html"><button type="button" class="button">功能列表</button></a></dd> -->
				</dl>
			</div>

			<form action="" method="get" autocomplete="on" class="form">

				<table class="table1">
					<!-- 控制表格宽度  横向合并 colspan="1"  竖向合并 rowspan="3" -->
					<thead><th width="10%"></th><th width="15%"></th><th width="10%"></th><th width="15%"></th><th width="10%"></th><th width="15%"></th><th width="10%"></th><th width="15%"></th></thead>
					<tr>
						
						<td class="genre">链接</td>
						<td colspan="7">
							<input type="text" class="input95" placeholder="默认进入app首页" name="url" value="{{.info.url}}">
						</td>
					</tr>
					<tr>
						<td class="genre">推送内容</td>
						<td colspan="7">
							<textarea placeholder="请输入推送的内容" class="textarea95" name="content" value="{{.info.content}}">{{.info.content}}</textarea>
						</td>
					</tr>
					<tr>
						<td class="genre" colspan="2">发送对象，默认为全员发生<label class="checkbox" style="float: right;height: 20px"><input type="checkbox" name="all">全选</label></td>
						<td colspan="6"><input type="text" class="select95 sx" placeholder="筛选" /></td>
					</tr>
					<tr class="product" pid="{{.id}}">
						<td colspan="8">
							{{range .member}}
							<label class="checkbox"><input type="checkbox" name="uid" value="{{.id}}" {{if $.info.user_group}}{{tipcheck .id $.info.user_group}}{{end}}>{{.monicker}}</label>
							{{end}}
						</td>
					</tr>
					<input type="hidden" name="id" value="{{.info.id}}">
			</form>
					<tr class="trbutton">
						{{if .info.id}}
						{{else}}
						<td colspan="2"><button type="button" class="button">发送</button></td>
						{{end}}
						<td colspan="6">
							<p>
								<i class="iconfont">&#xe649;</i> 请检查内容确认发布的内容没有涉及传播谣言、政治话题或违反广告法夸大宣传产品等。
							</p>
							<div class="help">帮助
								<div class="help_qr"><img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/all/qr-code.jpg" alt=""></div>
							</div>
						</td>
					</tr>
				</table>


		</div>
	</article>
</section>

<footer><!-- 系统监控内容 --></footer>
	<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/jquery.jedate.min.js"></script>
	<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/toast.js"></script>
	<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/uppic.js"></script>
	<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/xcConfirm.js"></script>
	<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/app.js"></script>
<script>
	var isCheckAll = false;
	$('input[name="all"]').click(function(){
		 if (isCheckAll) {  
            $("input[type='checkbox']").each(function() {  
                this.checked = false;  
            });  
            isCheckAll = false;  
        } else {  
            $("input[type='checkbox']").each(function() {  
                this.checked = true;  
            });  
            isCheckAll = true;  
        }  

	})
	$('.sx').bind('input propertychange', function(){
		var val=$(this).val()
		var input;
		 input=$('.product').find('.checkbox')
		if(val==''){
			input.each(function(){
				$(this).css('display','table')
			})
		}else{
			input.each(function(){
				var res=$(this).text().indexOf(val)
				if(res==-1){
					$(this).css('display','none')
				}else{
					$(this).css('display','table')
				}
			})
		}
	})
	$('.button').click(function(){
		// if (!$('input[name="title"]').val()){
		// 	window.wxc.xcConfirm("请输入标题！","info"); return false;
		// }
		// if (!$('input[name="gid"]').val()){
		// 	window.wxc.xcConfirm("请输入所属店铺id！","info"); return false;
		// }
		if (!$('textarea[name="content"]').val()){
			window.wxc.xcConfirm("请输入推送内容！","info"); return false;
		}

		var form=$('form').not($("input[type='all']")).serialize()
		$.ajax({
			url:window.location.href,
			data:form,
			type:'post',
			success:function(res){
				if(res==1){
					 window.wxc.xcConfirm("推送成功","success",{onClose:function(){
                        window.location.href = document.referrer
                    }})
				}else {
					 window.wxc.xcConfirm("推送失败,请重试!","error")
				}
			}
		})
	});
</script>
</body>
</html>
